<%--
  Created by IntelliJ IDEA.
  User: 陈金平
  Date: 2020/11/20
  Time: 16:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <title>修改医生</title>
</head>

<body>
<h1 class="text-center pt-3 pb-3">修改医生</h1>

<div class="container">
    <hr>
    <form action="set_doctor" method="post">
        <input type="hidden" name="id" value="${doctor.id}">
        <div class="form-group row">
            <h4 class="offset-md-3 col-md-2 text-right">姓　名：</h4>
            <div class="col-md-4">
                <input type="text" required="required" class="form-control" id="inputUsername" name="name" value="${doctor.name}" placeholder="">
            </div>
        </div>
        <div class="form-group row">
            <h4 class="offset-md-3 col-md-2 text-right" >生　日：</h4>
            <div class="col-md-4">
                <input type="text" required="required" class="form-control" id="inputPassword" name="birthday" value="${doctor.birthday}" placeholder="">
            </div>
        </div>
        <div class="form-group row">
            <h4 class="offset-md-3 col-md-2 text-right">性　别：</h4>
            <div class="col-md-4">
                <select class="form-control" name="sex">
                    <c:if test="${doctor.sex=='男'}">
                        <option value="${doctor.sex}" >男</option>
                        <option >女</option>
                    </c:if>
                    <c:if test="${doctor.sex=='女'}">
                        <option value="${doctor.sex}" >女</option>
                        <option >男</option>
                    </c:if>
                </select>
            </div>
        </div>
        <div class="form-group row">
            <h4 class="offset-md-3 col-md-2 text-right">科　室：</h4>
            <div class="col-md-4">
                <select class="form-control" name="department">
                    <c:forEach items="${departments}" var="d">
                        <option value="${d.did}" ${d.did==doctor.did?"selected":""}>${d.dname}</option>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="offset-md-5 col-md-4 text-left">
            <button type="submit" class="btn btn-primary">修改医生</button>
            <button type="button" class="btn btn-outline-primary">关闭窗口</button>
        </div>
    </form>
</div>
</body>
</html>


